(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <graphics/rastport.h>
#include <graphics/text.h>
#include <proto/graphics.h>
ULONG TextFit()
SYNOPSIS
struct RastPort * rp
STRPTR string
ULONG strLen
struct TextExtent * textExtent
struct TextExtent * constrainingExtent
LONG strDirection
ULONG constrainingBitWidth
ULONG constrainingBitHeight

LOCATION
In GfxBase at offset 116
FUNCTION
Tries to fill the given space with as many characters of the font in rp as possible and returns that number.

INPUTS
rp
Use the settings in this RastPort (eg. Font)
string
Use this string
strLen
The length of the string
textExtent
The size actually occupied will be returned here
constrainingExtent
If non-NULL, the routine will use the dimensions of the box described here
strDirection
In which is the next character. Must be either 1
or
1. If it is -1, then string must point to the end (the first character to check) of the text to fit (this is for checking text which runs from right to left).
constrainingBitWidth
If constrainingExtent is NULL, then this is the width of the bounding box.
constrainingBitHeight
If constrainingExtent is NULL, then this is the height of the bounding box.
RESULT
The number of characters which fit in the bounding box. If any characters fit in the bounding box, then textExtent will tell how large the minimal bounding box for the string is.

NOTES
EXAMPLE
BUGS
SEE ALSO
TextLength()
INTERNALS
HISTORY
06.03.1997 digulla
One new function